package cn.iocoder.ny.module.mall.mapper;

import cn.iocoder.ny.module.mall.controller.admin.config.vo.MallConfigPageVo;
import cn.iocoder.ny.module.mall.controller.admin.product.dto.MallProductListDTO;
import cn.iocoder.ny.module.mall.controller.admin.product.vo.MallProductPageVo;
import cn.iocoder.ny.module.mall.domain.MallConfig;
import cn.iocoder.ny.module.mall.domain.MallProduct;
import cn.iocoder.ny.module.mall.domain.vo.MallProductVo;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface MallProductMapper extends BaseMapperX<MallProduct> {
    int updateBatch(List<MallProduct> list);

    int updateBatchSelective(List<MallProduct> list);

    int batchInsert(@Param("list") List<MallProduct> list);

    IPage<MallProductVo> queryMallProductList(IPage<MallProductVo> page,@Param("reqVO") MallProductPageVo mallProductListDTO);
    MallProductVo queryByProductId(MallProductListDTO mallProductListDTO);
    List<MallProductVo> selectProductReplay(@Param("title") String title, @Param("id")Integer id, @Param("specName") String specName);

    List<HashMap<String,Object>> queryCategorySaleDesc(Long tenantId);

    List<HashMap<String,Object>>  queryProductSaleRank(Long tenantId);
}